﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;

namespace AzureGames.Data.Implementation.ServiceEntities
{
    public class UserStatisticsEntity : BaseTableEntity
    {
        public string PlayerID { get; set; }
        public int GameType { get; set; }
        public int GameDefinitionID { get; set; }
        public DateTime Date { get; set; }

        // properties
        public int CreatedGames { get; set; }
        public int CancelledGames { get; set; }
        public int CompletedGames { get; set; } 

        public static implicit operator Model.Statistics.UserStatistics(UserStatisticsEntity from)
        {
            return AutoMapper.Mapper.Map<UserStatisticsEntity, Model.Statistics.UserStatistics>(from);
        }

        public static implicit operator UserStatisticsEntity(Model.Statistics.UserStatistics from)
        {
            return AutoMapper.Mapper.Map<Model.Statistics.UserStatistics, UserStatisticsEntity>(from);
        }
    }
}
